﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Effects.Effects.Tools
{
    /// <summary>
    ///   Base class for all delay lines.
    /// </summary>
    /// <remarks>
    ///   Sometimes it might be useful to be able to take delay lines just as a black-box-like machine. We put sample in and get sample out of it.
    ///   This class is the most basic interface for delay lines.
    /// </remarks>
    public abstract class DelayLine
    {
        /// <summary>
        ///  Gets sample at the top of the delay line. 
        /// </summary>
        /// <remarks>
        ///   Useful to get the top of the delay line without poping it out.
        /// </remarks>
        public abstract double Top {get; }

        /// <summary>
        ///  Performs one step of the delay line. Puts given sample to the input of line and returns current output.
        /// </summary>
        /// <param name="sample"> Sample to put into delay line. </param>
        /// <returns> Current output sample from delay line. </returns>
        public abstract double Step(double sample);

    }
}